00001
00009 #include "stdafx.h"
00010 #include "TraffEdu.h"
00011 #include "SignForm.h"
00012 #include "RoadForm.h"
00013 #include "VehicleForm.h"
00014 #include "EnvObjectsForm.h"
00015 #include "LightForm.h"
00016 #include "splitter.h"
00017 #include ".\signform.h"
00018
00019
00020 IMPLEMENT_DYNCREATE(SignForm, CFormView)
00021
00022 SignForm::SignForm()
00023 : CFormView(SignForm::IDD)
00024 {
00025 m_h_icon_dikkat = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON10),
00026 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00027 m_h_icon_yolver = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON11),
00028 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00029 m_h_icon_isikli = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON12),
00030 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00031 m_h_icon_sagatehlikeliviraj = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON13),
00032 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00033 m_h_icon_solatehlikeliviraj = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON14),
00034 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00035 m_h_icon_sagadevamlitehlikeliviraj = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON15),
00036 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00037 m_h_icon_soladevamlitehlikeliviraj = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON16),
00038 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00039 m_h_sag_ana_tali = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON17),
00040 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00041 m_h_sol_ana_tali = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON18),
00042 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00043 m_h_dur = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON19),
00044 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00045 m_h_sagayasak = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON20),
00046 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00047 m_h_solayasak = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON21),
00048 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00049 m_h_sollamayapma = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON22),
00050 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00051 m_h_u_yapma = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON23),
00052 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00053 m_h_aracgiremez = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON24),
00054 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00055 m_h_ilerimecburi = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON25),
00056 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00057 m_h_sagamecburi = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON27),
00058 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00059 m_h_solamecburi = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON28),
00060 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00061 m_h_ilerisagamecburi = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON29),
00062 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00063 m_h_ilerisolamecburi = static_cast<HICON>(LoadImage (theApp.m_hInstance, MAKEINTRESOURCE(IDI_ICON30),
00064 IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR));
00065
00066 }
00067
00068 SignForm::~SignForm()
00069 {
00070 }
00071
00072 void SignForm::DoDataExchange(CDataExchange* pDX)
00073 {
00074 CFormView::DoDataExchange(pDX);
00075 DDX_Control(pDX, IDC_BUTTON5, dikkatButton);
00076 DDX_Control(pDX, IDC_BUTTON6, button6);
00077 DDX_Control(pDX, IDC_BUTTON7, button7);
00078 DDX_Control(pDX, IDC_BUTTON8, button8);
00079 DDX_Control(pDX, IDC_BUTTON9, button9);
00080 DDX_Control(pDX, IDC_BUTTON10, button10);
00081 DDX_Control(pDX, IDC_BUTTON11, button11);
00082 DDX_Control(pDX, IDC_BUTTON12, button12);
00083 DDX_Control(pDX, IDC_BUTTON13, button13);
00084 DDX_Control(pDX, IDC_BUTTON14, button14);
00085 DDX_Control(pDX, IDC_BUTTON15, button15);
00086 DDX_Control(pDX, IDC_BUTTON16, button16);
00087 DDX_Control(pDX, IDC_BUTTON17, button17);
00088 DDX_Control(pDX, IDC_BUTTON18, button18);
00089 DDX_Control(pDX, IDC_BUTTON19, button19);
00090 DDX_Control(pDX, IDC_BUTTON20, button20);
00091 DDX_Control(pDX, IDC_BUTTON21, button21);
00092 DDX_Control(pDX, IDC_BUTTON22, button22);
00093 DDX_Control(pDX, IDC_BUTTON25, button25);
00094
00095 }
00096
00097 BEGIN_MESSAGE_MAP(SignForm, CFormView)
00098 ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
00099 ON_BN_CLICKED(IDC_BUTTON2, OnBnClickedButton2)
00100 ON_BN_CLICKED(IDC_BUTTON3, OnBnClickedButton3)
00101 ON_BN_CLICKED(IDC_BUTTON5, OnBnClickedButton5)
00102 ON_BN_CLICKED(IDC_BUTTON6, OnBnClickedButton6)
00103 ON_BN_CLICKED(IDC_BUTTON7, OnBnClickedButton7)
00104 ON_BN_CLICKED(IDC_BUTTON8, OnBnClickedButton8)
00105 ON_BN_CLICKED(IDC_BUTTON9, OnBnClickedButton9)
00106 ON_BN_CLICKED(IDC_BUTTON10, OnBnClickedButton10)
00107 ON_BN_CLICKED(IDC_BUTTON11, OnBnClickedButton11)
00108 ON_BN_CLICKED(IDC_BUTTON12, OnBnClickedButton12)
00109 ON_BN_CLICKED(IDC_BUTTON13, OnBnClickedButton13)
00110 ON_BN_CLICKED(IDC_BUTTON14, OnBnClickedButton14)
00111 ON_BN_CLICKED(IDC_BUTTON15, OnBnClickedButton15)
00112 ON_BN_CLICKED(IDC_BUTTON16, OnBnClickedButton16)
00113 ON_BN_CLICKED(IDC_BUTTON17, OnBnClickedButton17)
00114 ON_BN_CLICKED(IDC_BUTTON18, OnBnClickedButton18)
00115 ON_BN_CLICKED(IDC_BUTTON19, OnBnClickedButton19)
00116 ON_BN_CLICKED(IDC_BUTTON20, OnBnClickedButton20)
00117 ON_BN_CLICKED(IDC_BUTTON21, OnBnClickedButton21)
00118 ON_BN_CLICKED(IDC_BUTTON22, OnBnClickedButton22)
00119 ON_BN_CLICKED(IDC_BUTTON25, OnBnClickedButton25)
00120 ON_BN_CLICKED(IDC_BUTTON23, OnBnClickedButton23)
00121 END_MESSAGE_MAP()
00122
00123
00124
00125
00126 #ifdef _DEBUG
00127 void SignForm::AssertValid() const
00128 {
00129 CFormView::AssertValid();
00130 }
00131
00132 void SignForm::Dump(CDumpContext& dc) const
00133 {
00134 CFormView::Dump(dc);
00135 }
00136 #endif //_DEBUG
00137
00138
00139
00140
00141 void SignForm::OnInitialUpdate()
00142 {
00143 CFormView::OnInitialUpdate();
00144 dikkatButton.SetIcon (m_h_icon_dikkat);
00145 button6.SetIcon (m_h_icon_yolver);
00146 button7.SetIcon (m_h_icon_isikli);
00147 button8.SetIcon (m_h_icon_sagatehlikeliviraj);
00148 button9.SetIcon (m_h_icon_solatehlikeliviraj);
00149 button10.SetIcon (m_h_icon_sagadevamlitehlikeliviraj);
00150 button11.SetIcon (m_h_icon_soladevamlitehlikeliviraj);
00151 button12.SetIcon (m_h_sag_ana_tali);
00152 button13.SetIcon (m_h_sol_ana_tali);
00153 button14.SetIcon (m_h_dur);
00154 button15.SetIcon (m_h_sagayasak);
00155 button16.SetIcon (m_h_solayasak);
00156 button17.SetIcon (m_h_sollamayapma);
00157 button18.SetIcon (m_h_u_yapma);
00158 button19.SetIcon (m_h_ilerimecburi);
00159 button20.SetIcon (m_h_sagamecburi);
00160 button21.SetIcon (m_h_solamecburi);
00161 button22.SetIcon (m_h_ilerisagamecburi);
00162 button25.SetIcon (m_h_ilerisolamecburi);
00163
00164 }
00165
00166 void SignForm::OnBnClickedButton1()
00167 {
00168 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00169 pParentSplitter->ReplaceView(RUNTIME_CLASS(RoadForm));
00170
00171 }
00172
00173 void SignForm::OnBnClickedButton2()
00174 {
00175 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00176 pParentSplitter->ReplaceView(RUNTIME_CLASS(VehicleForm));
00177 }
00178
00179 void SignForm::OnBnClickedButton3()
00180 {
00181 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00182 pParentSplitter->ReplaceView(RUNTIME_CLASS(LightForm));
00183 }
00184
00185 void SignForm::OnBnClickedButton5()
00186 {
00187 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00188
00189 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00190
00191 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00192 pFrame->signType = DIKKAT;
00193
00194 }
00195
00196 void SignForm::OnBnClickedButton6()
00197 {
00198 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00199
00200 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00201
00202 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00203 pFrame->signType = YOL_VER;
00204 }
00205
00206 void SignForm::OnBnClickedButton7()
00207 {
00208 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00209
00210 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00211
00212 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00213 pFrame->signType = ISIKLI_ISARET_CIHAZI;
00214 }
00215 void SignForm::OnBnClickedButton8()
00216 {
00217 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00218
00219 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00220
00221 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00222 pFrame->signType = SAGA_TEHLIKELI_VIRAJ;
00223 }
00224 void SignForm::OnBnClickedButton9()
00225 {
00226 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00227
00228 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00229
00230 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00231 pFrame->signType = SOLA_TEHLIKELI_VIRAJ;
00232 }
00233 void SignForm::OnBnClickedButton10()
00234 {
00235
00236 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00237
00238 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00239
00240 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00241 pFrame->signType = SAGA_TEHLIKELI_DEVAMLI_VIRAJ;
00242 }
00243 void SignForm::OnBnClickedButton11()
00244 {
00245 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00246
00247 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00248
00249 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00250 pFrame->signType = SOLA_TEHLIKELI_DEVAMLI_VIRAJ;
00251 }
00252 void SignForm::OnBnClickedButton12()
00253 {
00254
00255 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00256
00257 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00258
00259 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00260 pFrame->signType = SAGDAN_ANAYOL_TALIYOL_KAVSAGI;
00261 }
00262
00263 void SignForm::OnBnClickedButton13()
00264 {
00265 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00266
00267 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00268
00269 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00270 pFrame->signType = SOLDAN_ANAYOL_TALIYOL_KAVSAGI;
00271 }
00272 void SignForm::OnBnClickedButton14()
00273 {
00274 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00275
00276 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00277
00278 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00279 pFrame->signType = DUR;
00280 }
00281
00282 void SignForm::OnBnClickedButton15()
00283 {
00284 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00285
00286 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00287
00288 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00289 pFrame->signType = SAGA_DONULMEZ;
00290
00291 }
00292
00293 void SignForm::OnBnClickedButton16()
00294 {
00295 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00296
00297 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00298
00299 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00300 pFrame->signType = SOLA_DONULMEZ;
00301
00302 }
00303
00304 void SignForm::OnBnClickedButton17()
00305 {
00306
00307 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00308
00309 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00310
00311 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00312 pFrame->signType = ONDEKI_TASITI_GECMEK_YASAKTIR;
00313
00314 }
00315
00316 void SignForm::OnBnClickedButton18()
00317 {
00318
00319 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00320
00321 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00322
00323 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00324 pFrame->signType = U_DONUSU_YAPILMAZ;
00325 }
00326
00327 void SignForm::OnBnClickedButton19()
00328 {
00329 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00330
00331 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00332
00333 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00334 pFrame->signType = ILERI_MECBURI_YON;
00335
00336 }
00337
00338 void SignForm::OnBnClickedButton20()
00339 {
00340 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00341
00342 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00343
00344 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00345 pFrame->signType =SAGA_MECBURI_YON;
00346 }
00347
00348 void SignForm::OnBnClickedButton21()
00349 {
00350 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00351
00352 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00353
00354 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00355 pFrame->signType =SOLA_MECBURI_YON;
00356 }
00357
00358 void SignForm::OnBnClickedButton22()
00359 {
00360 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00361
00362 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00363
00364 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00365 pFrame->signType =ILERI_SAGA_MECBURI_YON;
00366 }
00367
00368 void SignForm::OnBnClickedButton25()
00369 {
00370 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00371
00372 CMainFrame *pFrame = reinterpret_cast<CMainFrame*>(pParentSplitter->GetParentFrame());
00373
00374 pFrame->drawMode = DRAW_TRAFFIC_SIGN;
00375 pFrame->signType =ILERI_SOLA_MECBURI_YON;
00376 }
00377
00378 void SignForm::OnBnClickedButton23()
00379 {
00380 C4WaySplitter* pParentSplitter = (C4WaySplitter*)GetParent();
00381 pParentSplitter->ReplaceView(RUNTIME_CLASS(EnvObjectsForm));
00382
00383 }